package com.tuanzi.loan.business.service.system;

import java.util.List;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.entity.system.Role;
import com.tuanzi.loan.core.service.BaseService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.system.RoleSearchRequest;
import com.tuanzi.loan.vo.response.system.RoleSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public interface RoleService extends BaseService<Role, String> {

	Page<RoleSearchResponse> list(PageSearcher<RoleSearchRequest> pageSearcher);

	List<Role> findAllByUserId(String userId);

	Role findByCode(String code);

	List<Role> findAllByCodes(List<String> codes);

	boolean hasRole(String account, String roleCode);

}
